package day21.pack7;

import javax.swing.plaf.TableHeaderUI;

public class Test {
    public static void main(String[] args) {
        Runnable r = () -> {
            while (true) {
                System.out.println(Thread.currentThread().getName());
            }
        };
        Thread t1 = new Thread(r, "A");
        Thread t2 = new Thread(r, "B");
        t1.setPriority(Thread.MAX_PRIORITY);
        t2.setPriority(Thread.MIN_PRIORITY);
        t1.start();
        t2.start();
    }
}
